package com.jdiv.samples.ufo;

import com.jdiv.JProcess;

public class Ufo extends JProcess {

private int velocidad=3;

	public Ufo(){
		file=Main.fpg_ufo;
		graph=1;
		x=100;
		y=100;
	}
	public void begin(){}
	public void loop(){
		graph++;
		
		if (graph==17) graph=1;
		
		if (key(_UP)) y-=velocidad;
		if (key(_DOWN)) y+=velocidad;
		if (key(_LEFT)) x-=velocidad;
		if (key(_RIGHT)) x+=velocidad;
	}
	
}
